package com.ruoyi.web.controller.system;

import com.ruoyi.web.service.C2CodeSubmitterCloudService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/api/C2CodeSubmitterCloud")
public class C2CodeSubmitterCloudController {

    @Autowired
    private C2CodeSubmitterCloudService codeMergeInfoService;

    /**
     * 获取当前自然月 `fullName` 出现次数前10名
     *
     * @return 前10名数据
     */
    @GetMapping("/byMonth")
    public List<Map<String, Object>> getTop10FullNameCloudCounts() {
        return codeMergeInfoService.getTop10FullNameCounts();
    }
}
